package live.ifox.stage;

import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;
import android.widget.SimpleAdapter;

import java.util.List;
import java.util.Map;

import live.ifox.factory.UpdateInfo;
import live.ifox.helper.AdapterHelper;

public class ChangeLogActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_change_log);

        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null)
            actionBar.setTitle(R.string.change_log);

        ListView listView = findViewById(R.id.listView);
        UpdateInfo info = new UpdateInfo();
        List<Map<String, Object>> infoModel = info.getModel();

        SimpleAdapter adapter = AdapterHelper.getTableAdapter(this, infoModel,
                new String[]{"label", "detail"});
        listView.setAdapter(adapter);
    }
}
